/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 检验记录Entity
 * @author HOHD
 * @version 2021-01-26
 */
@Table(name="st_stock_check_history", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="product_code", attrName="productCode", label="产品编码"),
		@Column(name="product_name", attrName="productName", label="产品名称", queryType=QueryType.LIKE),
		@Column(name="batch_number", attrName="batchNumber", label="批次号"),
		@Column(name="check_result", attrName="checkResult", label="检验结果"),
		@Column(name="check_desc", attrName="checkDesc", label="检验描述"),
		@Column(name="make_date", attrName="makeDate", label="制单时间"),
		@Column(name="create_by", attrName="createBy", label="创建者", isUpdate=false, isQuery=false),
		@Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false),
		@Column(name="update_by", attrName="updateBy", label="更新者", isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="更新时间", isQuery=false),
		@Column(name="remarks", attrName="remarks", label="备注信息", queryType=QueryType.LIKE),
		@Column(name="check_man_code", attrName="checkManCode", label="检验人编码"),
		@Column(name="check_man", attrName="checkMan", label="检验人"),
		@Column(name="parent_id", attrName="parentId", label="父 id"),
	}, orderBy="a.update_date DESC"
)
public class StStockCheckHistory extends DataEntity<StStockCheckHistory> {
	
	private static final long serialVersionUID = 1L;
	private String productCode;		// 产品编码
	private String productName;		// 产品名称
	private String batchNumber;		// 批次号
	private Integer checkResult;		// 检验结果
	private String checkDesc;		// 检验描述
	private Date makeDate;		// 制单时间
	private String checkManCode;		// 检验人编码
	private String checkMan;		// 检验人
	private String parentId;		// 父 id
	
	public StStockCheckHistory() {
		this(null);
	}

	public StStockCheckHistory(String id){
		super(id);
	}
	
	@Length(min=0, max=20, message="产品编码长度不能超过 20 个字符")
	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}
	
	@Length(min=0, max=36, message="产品名称长度不能超过 36 个字符")
	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}
	
	@Length(min=0, max=20, message="批次号长度不能超过 20 个字符")
	public String getBatchNumber() {
		return batchNumber;
	}

	public void setBatchNumber(String batchNumber) {
		this.batchNumber = batchNumber;
	}
	
	public Integer getCheckResult() {
		return checkResult;
	}

	public void setCheckResult(Integer checkResult) {
		this.checkResult = checkResult;
	}
	
	@Length(min=0, max=500, message="检验描述长度不能超过 500 个字符")
	public String getCheckDesc() {
		return checkDesc;
	}

	public void setCheckDesc(String checkDesc) {
		this.checkDesc = checkDesc;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getMakeDate() {
		return makeDate;
	}

	public void setMakeDate(Date makeDate) {
		this.makeDate = makeDate;
	}
	
	@Length(min=0, max=20, message="检验人编码长度不能超过 20 个字符")
	public String getCheckManCode() {
		return checkManCode;
	}

	public void setCheckManCode(String checkManCode) {
		this.checkManCode = checkManCode;
	}
	
	@Length(min=0, max=5, message="检验人长度不能超过 5 个字符")
	public String getCheckMan() {
		return checkMan;
	}

	public void setCheckMan(String checkMan) {
		this.checkMan = checkMan;
	}
	
	@Length(min=0, max=36, message="父 id长度不能超过 36 个字符")
	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}
	
}